from sqlalchemy import Column, ForeignKey, String, Integer, Text, orm
from app.models.base import Base

class Supplier(Base):
    S_id = Column(Integer, primary_key=True,autoincrement=True)#主键
    Supplier_name=Column(String(255), nullable=True)
    #question_text = Column(Text, nullable=True)
    Supplier_address = Column(String(255), nullable=True)
    Sname = Column(String(50), nullable=False)
    Sprice = Column(Integer, nullable=False)
    def __init__(self,S_id,Supplier_name,Supplier_address,Sname ,Sprice):
        super(Supplier,self).__init__()
        self.S_id = S_id
        self.Supplier_name = Supplier_name
        self.Supplier_address = Supplier_address
        self.Sname = Sname
        self.Sprice = Sprice
      